using System;
using System.Collections.Generic;
using System.Text;

namespace interfaces
{
	public static class Cost
	{
		public enum BEE_EcmCostStage_T
		{
			Original_ECMCST,	// before retrofit.
			Retrofit_ECMCST,	// after retrofit.
			NUM_ECMCST
		};
		
		/// <summary>
		/// enum for cost construction work type, replacement of addition
		/// </summary>
		public enum BEE_EcmCostWork_T
		{
			Replacement_ECMCT,	// replacement cost type, the cost will be applied regardless of original cost.
			Addition_ECMCT,		// additional cost type, the cost will be applied after deduction from original cost.
			NUM_ECMCWT
		};

		/// <summary>
		/// cost category strings. Also used for query table name.
		/// </summary>
		public static string[] BEE_EcmCostWork = new string[]
		{
			"Replacement",
			"Addition"
		};

		/// <summary>
		/// enum for cost category
		/// </summary>
		public enum BEE_EcmCostCat_T
		{
			Material_ECCT,		// material cost type,
			Labor_ECCT,			// labor cost type,
			OM_ECCT,			// O&M cost
			NUM_ECMCCT
		};

		/// <summary>
		/// cost category strings. Also used for query table name.
		/// </summary>
		public static string[] BEE_EcmCostCat = new string[]
		{
			"MaterialCost",
			"LaborHour",
			"OMCost"
		};

		/// <summary>
		/// economic output type
		/// </summary>
		public enum BEE_Economic_T
		{ 
			EnergySaving_ET,
			EcmCost_ET,
			NUM_ET
		};

		/// Chinese construction labor rate, in [RMB/hr]
		public static double BEE_laborRate = 20;

		/// <summary>
		/// Economic results types
		/// </summary>
		public enum BEE_EconomyResult_T
		{
			EnergySaving_ERT,	// total energy (energyelectricity + gas) saving, "+" for saving, "-" for not saving, in [RMB].
			TotalCost_ERT,		// total cost (material + labor), in [RMB].
			PayBackPeriod_ERT,	// payback period in [year]
			NUM_ERT
		};

		/// <summary>
		/// cost type for ECMs,
		/// the 1st element is accessed through enum Keyword.keyword_t
		/// the 2nd element is accessed through enum Keyword.BEE_EcmCostCat_T
		/// </summary>
		public static BEE_EcmCostWork_T[][] BEE_EcmCostType = new BEE_EcmCostWork_T[][]
		{
			new BEE_EcmCostWork_T[] { BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// C1
			new BEE_EcmCostWork_T[] { BEE_EcmCostWork_T.Addition_ECMCT,		BEE_EcmCostWork_T.Replacement_ECMCT	},	// C2
			new BEE_EcmCostWork_T[] { BEE_EcmCostWork_T.Addition_ECMCT,		BEE_EcmCostWork_T.Addition_ECMCT	},	// C3
			new BEE_EcmCostWork_T[] { BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// C4
			new BEE_EcmCostWork_T[] { BEE_EcmCostWork_T.Addition_ECMCT,		BEE_EcmCostWork_T.Replacement_ECMCT	},	// C5
			new BEE_EcmCostWork_T[] { BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// C6
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// C7
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// C8
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// C9
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// D1
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// D2
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// D3
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// D4
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// E1
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// E2
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// E3
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// E4
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// E5
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// E6
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// E7
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// F1
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// G1
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// G2
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// G3
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	},	// G7
			new BEE_EcmCostWork_T[]	{ BEE_EcmCostWork_T.Replacement_ECMCT,	BEE_EcmCostWork_T.Replacement_ECMCT	}	// H2
		};

		public static Building.BEE_BuildingFloorArea_T[] BEE_EcmCostAreaType = new Building.BEE_BuildingFloorArea_T[(int)Keyword.keyword_t.NUM_KWT]
		{
			Building.BEE_BuildingFloorArea_T.Wall_BFAT,					// C1
			Building.BEE_BuildingFloorArea_T.Wall_BFAT,					// C2
			Building.BEE_BuildingFloorArea_T.Envelope_BFAT,			// C3
			Building.BEE_BuildingFloorArea_T.Roof_BFAT,				// C4
			Building.BEE_BuildingFloorArea_T.Roof_BFAT,				// C5
			Building.BEE_BuildingFloorArea_T.Window_BFAT,			// C6
			Building.BEE_BuildingFloorArea_T.Window_BFAT,			// C7
			Building.BEE_BuildingFloorArea_T.Window_BFAT,			// C8
			Building.BEE_BuildingFloorArea_T.Window_BFAT,			// C9
			Building.BEE_BuildingFloorArea_T.Total_BFAT,			// D1
			Building.BEE_BuildingFloorArea_T.Total_BFAT,			// D2
			Building.BEE_BuildingFloorArea_T.Total_BFAT,			// D3
			Building.BEE_BuildingFloorArea_T.Facade_BFAT,			// D4
			Building.BEE_BuildingFloorArea_T.Conditioned_BFAT,		// E1
			Building.BEE_BuildingFloorArea_T.Conditioned_BFAT,		// E2
			Building.BEE_BuildingFloorArea_T.Conditioned_BFAT		// E3
//			Building.BEE_BuildingFloorArea_T.ConditionedArea_BFAT,		// E4
//			Building.BEE_BuildingFloorArea_T.ConditionedArea_BFAT,		// E5
//			Building.BEE_BuildingFloorArea_T.ConditionedArea_BFAT,		// E6
//			Building.BEE_BuildingFloorArea_T.ConditionedArea_BFAT		// E7
//			Building.BEE_BuildingFloorArea_T.Refrigeration_BFAT,		// F1
//			Building.BEE_BuildingFloorArea_T.LightingControlArea_BFAT,	// G1
//			Building.BEE_BuildingFloorArea_T.LightingControlArea_BFAT,	// G2
//			Building.BEE_BuildingFloorArea_T.ConditionedArea_BFAT,		// G3
//			Building.BEE_BuildingFloorArea_T.ConditionedArea_BFAT,		// G7
//			Building.BEE_BuildingFloorArea_T.ConditionedArea_BFAT		// H2
		};
	}
}
